<query-editor-row query-ctrl="ctrl" can-collapse="true">

	<div class="gf-form-inline">
		<div class="gf-form gf-form--grow">
			<label class="gf-form-label query-keyword width-7">查询</label>
			<input type="text" class="gf-form-input" ng-model="ctrl.target.query" spellcheck='false' placeholder="Lucene 查询" ng-blur="ctrl.refresh()">
		</div>
		<div class="gf-form max-width-15">
			<label class="gf-form-label query-keyword">别名</label>
			<input type="text" class="gf-form-input" ng-model="ctrl.target.alias" spellcheck='false' placeholder="别名模式" ng-blur="ctrl.refresh()">
		</div>
	</div>

	<div ng-repeat="agg in ctrl.target.metrics">
		<elastic-metric-agg
			target="ctrl.target" index="$index"
			get-fields="ctrl.getFields($fieldType)"
			on-change="ctrl.queryUpdated()"
			es-version="ctrl.esVersion">
		</elastic-metric-agg>
	</div>

	<div ng-repeat="agg in ctrl.target.bucketAggs">
		<elastic-bucket-agg
			target="ctrl.target" index="$index"
			get-fields="ctrl.getFields($fieldType)"
			on-change="ctrl.queryUpdated()">
		</elastic-bucket-agg>
	</div>

</query-editor-row>
